/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server;
import java.util.List;
import java.util.ArrayList;
/**
 *
 * @author KingofSpeed
 */
public class Column
{

    private String title;
    private List<String> ref;
    private boolean isPrimary;
    private boolean isNotNull;
    private boolean isHaveForeignKey;
    private int nRow;
    private List<String> listRow;
    private String type;

    
   
    public Column()
    {
        title = "";
        ref = new ArrayList<String>();
        isHaveForeignKey = isNotNull = isPrimary = false;
        listRow = new ArrayList<String>();
        type = "String";
    }
    
    
    public boolean isIsHaveForeignKey() {
        return (ref.size()> 0);
    }

    public void setIsHaveForeignKey(boolean isHaveForeignKey) {
        this.isHaveForeignKey = isHaveForeignKey;
    }
    public boolean isIsPrimary() {
        return isPrimary;
    }

    public void setIsPrimary(boolean isPrimary) {
        this.isPrimary = isPrimary;
    }

    public int getnRow() {
        return listRow.size();
    }

    public void setnRow(int nRow) {
        this.nRow = nRow;
    }

    public List<String> getRef() {
        return ref;
    }

    public void setRef(List<String> ref) {
        this.ref = ref;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
     public boolean isIsNotNull() {
        return isNotNull;
    }

    public void setIsNotNull(boolean isNotNull) {
        this.isNotNull = isNotNull;
    }

    public List<String> getListRow() {
        return listRow;
    }

    public void setListRow(List<String> listRow) {
        this.listRow = listRow;
    }
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
